package com.yuankeji.generator.core;

import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.mock.jndi.SimpleNamingContextBuilder;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests;
import org.testng.annotations.BeforeSuite;

import javax.sql.DataSource;

/**
 * Copyright (C), 2017-2018
 *
 * @version v1.0
 * @author: Alex
 * @Date: 2018/1/23
 * @description: class BaseTester
 */
@ContextConfiguration(locations = { "classpath*:/spring-context.xml" })
public abstract class BaseTester  extends AbstractTransactionalTestNGSpringContextTests {

    @BeforeSuite
    public static void beforeClass() throws Exception{
        /*ClassPathXmlApplicationContext app =new ClassPathXmlApplicationContext("classpath:jndi.xml");
        DataSource ds =(DataSource) app.getBean("dataSource");
        SimpleNamingContextBuilder builder =new SimpleNamingContextBuilder();
        builder.bind("java:...", ds);
        builder.activate();*/
    }
}
